package com.itheima.demo;

import java.util.*;

public class Demo02 {

    public static void main(String[] args) {

        //创建list
        ArrayList<String> list = new ArrayList<>(List.of("鹿晗","鹿晗","鹿晗","鹿晗","鹿晗"));
        HashSet<String> set = new HashSet<>(Set.of("a","v","b"));
        //Set 不可重复 of中不能有重复元素

        HashMap<String, String> map = new HashMap<>(Map.of("关晓彤", "鹿晗", "马蓉", "宝强"));
        //map都是成双成对
        HashMap<String, String> map2 = new HashMap<>(Map.ofEntries(Map.entry("关晓彤", "鹿晗")));

        System.out.println(list);
        System.out.println(set);
        System.out.println(map);
        System.out.println(map2);

    }
}
